package com.lagou.zuoye;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author 尘
 * @data 2022/5/13 10:46
 */
public class TsetDbu {

    public static void main(String[] args) throws SQLException {
        Connection connection = DBUtils.getConnection();

        Statement statement = connection.createStatement();

        ResultSet resultSet = statement.executeQuery("select * from employee");

        while (resultSet.next()){
            String name = resultSet.getString("name");
            String gender = resultSet.getString("gender");

            System.out.println("姓名：" + name +" "+ "性别：" + gender);
        }

        resultSet.close();
        statement.close();
        connection.close();
    }
}
